<?php
namespace app\webadmin\validate;

use think\Validate;

class JingmiduCheck extends Validate
{
    protected $rule = [
        'nums' => 'require',
        'id' => 'require',
        'data1' => 'require',
        'data2'=>'require',

    ];

    protected $message = [
        'nums.require' => '样品不能为空',
        'data1.unique' => '数据1不能为空',
        'data2.unique' => '数据2不能为空',
        'id.require' => '缺少更新条件',
    ];

    protected $scene = [
        'add' => ['nums','data1','data2'],
        'edit' => ['id','nums','data1','data2'],
    ];
}